﻿@namespace AntDesign
@using AntDesign.Internal
@inherits AntDomComponentBase
<CascadingValue Value='$"ant-mentions-dropdown"' Name="PrefixCls" IsFixed>
    <OverlayTrigger @ref="_overlayTrigger"
                    Trigger="new[] { Trigger.None }"
                    OverlayLeaveCls=""
                    OverlayEnterCls=""
                    HiddenMode=true
                    InlineFlexMode=false>
        <Overlay>
            <CascadingValue Value=this>
                @if (OriginalOptions.Count > 0)
                {
                    <ul class="ant-mentions-dropdown-menu ant-mentions-dropdown-menu-root ant-mentions-dropdown-menu-vertical">
                        @foreach (var item in ShowOptions)
                        {
                            <MentionsOption Value="@item.Value">@item.ChildContent</MentionsOption>
                        }
                    </ul>
                }
                else
                {
                    @ChildContent
                }
            </CascadingValue>
        </Overlay>

        <Unbound>
            @*！！！！！！！！！！！这里不能缩进换行代码！！！！！！！！！！！！！！！*@
            <div class="@ClassMapper.Class"><textarea value="@Value"
                          @ref="context.Current"
                          @attributes="@Attributes"
                          @onkeydown="OnKeyDown"
                          @oninput="OnInput" style="@Style"
                          class="rc-textarea"
                          placeholder="@Placeholder"
                          rows="@Rows" /></div>
        </Unbound>
    </OverlayTrigger>
</CascadingValue>
